import 'package:common/dio/model.dart';

class WpTerm extends BaseModel {
  int? id;
  String? name;
  String? slug;
  String? description;
  int? count;
  int? parent;
  String? taxonomy;
  String? url;
  String? cover;

  WpTerm({
    this.id,
    this.name = "",
    this.slug,
    this.description,
    this.count,
    this.parent,
    this.taxonomy,
    this.url,
    this.cover,
  });

  WpTerm.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    slug = json['slug'];
    description = json['description'];
    count = json['count'];
    parent = json['parent'];
    taxonomy = json['taxonomy'];
    url = json['url'];
    cover = json['cover'];
  }
  @override
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    data['slug'] = slug;
    data['description'] = description;
    data['count'] = count;
    data['parent'] = parent;
    data['taxonomy'] = taxonomy;
    data['url'] = url;
    data['cover'] = cover;
    return data;
  }
}
